﻿CREATE TABLE [dbo].[BoardGame] (
	[BoardGameId]           INT            IDENTITY (1, 1) NOT NULL,
	[UserId]                 INT            NOT NULL,
	[Name]                    NVARCHAR (128) NOT NULL,
	[GroupWinsCollectively] BIT            NOT NULL,
	[CreatedBy]              NVARCHAR (256) NOT NULL,
	[CreateDate]             DATETIME       NOT NULL,
	[ModifiedBy]             NVARCHAR (256) NOT NULL,
	[ModifyDate]             DATETIME       NOT NULL,
	CONSTRAINT [PK_BoardGame] PRIMARY KEY CLUSTERED ([BoardGameId] ASC),
	CONSTRAINT [FK_BoardGame_User] FOREIGN KEY ([UserId])
		REFERENCES dbo.[User] ([UserId])
);
go
create unique index UX_BoardGame_Name on dbo.BoardGame ([Name])
go
create index IX_BoardGame_UserId on dbo.BoardGame ([UserId])
go
